﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using System.Xml;
namespace HeavenvsDarkness
{
    public class ChoseForceScreen : MyForm
    {
        public ChoseForceScreen()
        {
            Items = new List<VisibleGameEntity>();
            InitComponent();
        }

        public void InitComponent()
        {
            XmlDocument Doc = new XmlDocument();
            Doc.Load("ConfigureInterface.xml");

            XmlNode nodeMainMenu = Doc.SelectSingleNode("/Game/Form[@Name='ChooseForce']");

            XmlNodeList Child = nodeMainMenu.ChildNodes;
            for (int i = 0; i < Child.Count; i++)
            {
                XmlElement ele = (XmlElement)Child[i];
                if (ele.Name == "Sprites")
                {
                    XmlNodeList SpriteList = ele.ChildNodes;
                    for (int j = 0; j < SpriteList.Count; j++)
                    {

                        XmlElement eleSprite = (XmlElement)SpriteList[j];
                        MySprite temp = new MySprite(eleSprite);
                        Items.Add(temp);
                    }
                }

                if (ele.Name == "Dialogs")
                {
                    XmlNodeList DialogList = ele.ChildNodes;
                    for (int j = 0; j < DialogList.Count; j++)
                    {

                        XmlElement eleDialog = (XmlElement)DialogList[j];
                        MyDialogChoseForce temp = new MyDialogChoseForce(eleDialog);
                        Items.Add(temp);
                    }
                }
              
            }

        }


        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);
        }
    }
}
